MeasureText
MeasureText Get array of widths of text
#include <Quickdraw.h> Quickdraw
void MeasureText( count, textPtr, charLocs );
short count ; number of characters to measure
char *textPtr ; address of buffer containing text to measure
short *charLocs ; address of array to hold pixel positions
MeasureText fills an array with the pixel offsets corresponding to the
width of each character in a specified text buffer.
count is the number of characters to measure (starting at textPtr ). It is
also the (size-1), in 2-byte ints, of the buffer that starts at
charLocs.
textPtr is the address of a buffer containing unformatted text to measure.
charLocs is the address of the start of an array of 2-byte ints. Upon return,
the first element will be set to 0, the second element will
contain the width of the first character, the next will contain the
combined width of the first two characters, and so forth.
The buffer pointed to by charLocs must be at least ( count+1) * 2
bytes long.
Returns: none

Notes: MeasureText is handy in figuring out which character in a line of text
will extend past a certain point (and therefore must be truncated or wrapped
to the next line). It works as if as a series of calls were made to
TextWidth, storing in the charLocs array, the width of each leading
subset of the text starting a textPtr.
Note that the "high performance" tool assumes that the entire string of text
is formatted in the same style, font, and size. Thus, be sure to use this to
measure only strings of text in the same style-run.
Use TextWidth or StringWidth for simply measuring a series of
characters and obtaining the total width. See SpaceExtra for a way to
right-justify a line of text.